require "test/unit"

  def triangle(a, b, c)
    triangle = if (a == b&&a == c)
                 :equilateral
               elsif (a == b && a != c)
                 :isosceles
               elsif (a == c&&a != b)
                 :isosceles
               elsif (b == c&&a != b)
                 :isosceles
               else
                 :scalene
                    
               end

  end


class AboutTriangleProject<Test::Unit::TestCase





  def test_string
    assert_equal :equilateral, triangle(2, 2, 2)
    assert_equal :equilateral, triangle(10, 10, 10)
  end

  def test_string1
    assert_equal :isosceles,  triangle(3, 4, 4)
    assert_equal :isosceles,  triangle(4, 3, 4)
    assert_equal :isosceles,  triangle(4, 4, 3)
    assert_equal :isosceles,  triangle(10, 10, 2)
  end

  def test_string2
    assert_equal :scalene,  triangle(3, 4, 5)
    assert_equal :scalene,  triangle(10, 11, 12)
    assert_equal :scalene,  triangle(5, 3, 2)
  end
end

#条件的建立和数值比较  
# 常见的逻辑关系   and 和， or 或， not 非， != 不等于  == 等于，>= 大于等于
#  <= 小于等于   true 真， false 假   
# if和else  建立多个条件（大于两种）中间可用elsif 也就是else if 的所写，后面接条件， else代表除开前面条件之外的所有条件，不应该再条件任何条件， 
